#ifndef GETAUDIOSIGNALINTHREAD_H
#define GETAUDIOSIGNALINTHREAD_H

#include <mlt++/Mlt.h>
#include <QThread>
#include <QString>
#include <iostream>

class GetAudioSignalInThread : public QThread{
    Q_OBJECT

public:
    explicit GetAudioSignalInThread(QObject *parent = 0);
    ~GetAudioSignalInThread();
    void run();
    bool hasAudioSignalGot();
    void extractInformationsIntoTab(QString videoFileName, float **waveForm);
    int getNFrames();
    int getFps();
    void stopAndFreeMemory();

signals:
    void dataExtracted();

public slots:

private:
    QString videoFileName;
    bool audioSignalGot;
    int fps;
    int nFrames;
    float *waveForm;
    float **waveFormToFillOut;
    bool dontTerminate;
    void _setVideoFileName(QString videoFileName);

};

#endif // GETAUDIOSIGNALINTHREAD_H
